import 'package:flutter/material.dart';
import 'package:flutter_blank/assets.dart';

class ImagePage extends StatelessWidget {
  const ImagePage({super.key});

  @override
  Widget build(BuildContext context) {
    // return const Image(image: AssetImage('assets/images/coffee.jpg'));
    return SingleChildScrollView(
      child: Center(
        child: Column(
          children: [for (var item in BoxFit.values) _buildFitImage(item)],
        ),
      ),
    );
  }

  Column _buildFitImage(fit) {
    return Column(
      children: [
        Text("$fit"),
        SizedBox(
          height: 200,
          width: 200,
          child: Image(
            image: const AssetImage(AssetImages.carPNG),
            color: Colors.amber,
            colorBlendMode: BlendMode.dstOver,
            fit: fit,
          ),
        ),
      ],
    );
  }
}
